<!--  -->
<template>
    <div class="comTitle w1021">
        <div class="relative inline" :id="name">
            <span class="comTxt">
               <i class="comSign"></i>
               {{ name }}
            </span>
        </div>
        <span class="comMore fr" v-if="more" @click="clickMore">更多 ></span>
    </div>
</template>

<script>
export default {
    data() {
        return {};
    },
    props: ["name", "more", "moreUrl"],
    methods: {
        //更多
        clickMore() {
            this.$router.push("/" + this.moreUrl);
            const head = document.getElementsByClassName("navItem")[0];
            const navList = document.getElementsByClassName("navList");
            const headOn = head.getElementsByClassName("" + this.moreUrl)[0];
            for (var i = 0; i < navList.length; i++) {
                navList[i].classList.remove("on");
            }
            headOn.classList.add("on");
        }
    }
};
</script>
<style lang="scss" scoped>
</style>